﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using Freeform;

namespace Space_in_Shaders
{
    public class Laser : Fader
    {
        public NMotion NMot { get; set; }

        public Laser(SpaceWorld World, Vector2 Position, Single Direction, Single Speed)
            : base(World, 800)
        {
            Game.LoadAnimation(this);
            Actor.Depth = 0.6f;

            SpatialProperties.Size = new Vector2(1, 4);
            SpatialProperties.Position = Position;
            SpatialProperties.Direction = Direction;

            NMot = new NMotion(SpatialProperties);
            NMot.ForceResistance = 1;
            NMot.Velocity = Util.Vec2InDir(Direction) * Speed;

            Damage = 1;
            EndColour = new Color(Vector4.One * 0.3f);

            // Setup collision properties for the spaceship.
            CollisionProperties.CollisionID = RadialCollision.CID_LASER;
            CollisionProperties.CollisionType = CollisionType.Passive;
            Radial.Radius = 4;

            ExplosionIntensity = 1;
        }

        public override void Update(GameTime time)
        {
            base.Update(time);
        }
    }
}
